package nc.ui.bd.pub.editor.card.beforeedit.body;

import nc.ui.medpub.editor.card.listener.ICardBodyBeforeEditEventListener;
import nc.ui.pub.bill.BillCardPanel;
import nc.ui.pub.bill.BillItem;
import nc.ui.pubapp.uif2app.event.card.CardBodyBeforeEditEvent;
import nc.vo.pub.lang.UFBoolean;

public class MarketAuth
  implements ICardBodyBeforeEditEventListener
{
  public void beforeEdit(CardBodyBeforeEditEvent e)
  {
    BillCardPanel card = e.getBillCardPanel();
    BillItem billItem = card.getBodyItem("blicensoreditable_148");
    UFBoolean editAble = (UFBoolean)card.getBodyValueAt(e.getRow(), "blicensoreditable_148");
    String clicensor_148 = (String)card.getBodyValueAt(e.getRow(), "clicensor_148");
    if ((("vlicensorname_148".equals(e.getKey())) || 
      ("vlicensoraddr_148".equals(e.getKey()))) && 
      (clicensor_148 != null) && (!"".equals(clicensor_148))) {
      e.setReturnValue(Boolean.valueOf(false));
    }
    if ((editAble != null) && (editAble.booleanValue()))
      e.setReturnValue(Boolean.valueOf(true));
    else
      e.setReturnValue(Boolean.valueOf(false));
  }
}